<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>DOCA-AR: doca_ar_core.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  $(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">DOCA-AR<span id="projectnumber">&#160;1.0</span>
   </div>
  </td>
    <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('doca__ar__core_8c.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle"><div class="title">doca_ar_core.c File Reference</div></div>
</div><!--header-->
<div class="contents">

<p>the critical logic of doca-ar  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="doca__ar__core_8h_source.html">doca_ar_core.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="doca__ar__conntrack_8h_source.html">doca_ar_conntrack.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="doca__ar__pipe_8h_source.html">doca_ar_pipe.h</a>&quot;</code><br />
<code>#include &lt;cmdline_rdline.h&gt;</code><br />
<code>#include &lt;cmdline_parse.h&gt;</code><br />
<code>#include &lt;cmdline_parse_ipaddr.h&gt;</code><br />
<code>#include &lt;cmdline_parse_num.h&gt;</code><br />
<code>#include &lt;cmdline_parse_string.h&gt;</code><br />
<code>#include &lt;cmdline.h&gt;</code><br />
<code>#include &lt;rte_string_fns.h&gt;</code><br />
<code>#include &lt;cmdline_socket.h&gt;</code><br />
<code>#include &lt;rte_byteorder.h&gt;</code><br />
<code>#include &lt;cmdline_parse_etheraddr.h&gt;</code><br />
<code>#include &lt;rte_ethdev.h&gt;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_port_stats.html">PortStats</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">packets num the control plane recv and sent  <a href="struct_port_stats.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_r_o_b_e___h_d_r.html">PROBE_HDR</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">the user-defined probe packets header  <a href="struct_p_r_o_b_e___h_d_r.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcmd__simple__result.html">cmd_simple_result</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a49230f4b3f7e0f19009da05690abd30f" id="r_a49230f4b3f7e0f19009da05690abd30f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a49230f4b3f7e0f19009da05690abd30f">PACKET_BURST</a>&#160;&#160;&#160;128</td></tr>
<tr class="memdesc:a49230f4b3f7e0f19009da05690abd30f"><td class="mdescLeft">&#160;</td><td class="mdescRight">num of tx_burst and rx_burst  <br /></td></tr>
<tr class="separator:a49230f4b3f7e0f19009da05690abd30f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89703962ce99eb88357cc3d3756d3a8c" id="r_a89703962ce99eb88357cc3d3756d3a8c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a89703962ce99eb88357cc3d3756d3a8c">EXPIRE_TIME</a>&#160;&#160;&#160;10</td></tr>
<tr class="memdesc:a89703962ce99eb88357cc3d3756d3a8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">default timeout of conn  <br /></td></tr>
<tr class="separator:a89703962ce99eb88357cc3d3756d3a8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aead8d0d68bbe6348d01b095c1a557100" id="r_aead8d0d68bbe6348d01b095c1a557100"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aead8d0d68bbe6348d01b095c1a557100">PROBE_PATH_AMOUNT</a>&#160;&#160;&#160;4</td></tr>
<tr class="memdesc:aead8d0d68bbe6348d01b095c1a557100"><td class="mdescLeft">&#160;</td><td class="mdescRight">default probed paths amount and packets amount we sent  <br /></td></tr>
<tr class="separator:aead8d0d68bbe6348d01b095c1a557100"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff3d24956ac78a4840a95e32cb39ba83" id="r_aff3d24956ac78a4840a95e32cb39ba83"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aff3d24956ac78a4840a95e32cb39ba83">PROBE_TIMEOUT</a>&#160;&#160;&#160;50</td></tr>
<tr class="memdesc:aff3d24956ac78a4840a95e32cb39ba83"><td class="mdescLeft">&#160;</td><td class="mdescRight">Probe Timeout[ms].  <br /></td></tr>
<tr class="separator:aff3d24956ac78a4840a95e32cb39ba83"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:adc14400a6be46fe268f46186d824c529" id="r_adc14400a6be46fe268f46186d824c529"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#adc14400a6be46fe268f46186d824c529">LB_SCHEME</a> { <a class="el" href="#adc14400a6be46fe268f46186d824c529aa7e29da9c14345bcc6cdd8325a8c61cb">DOCA_AR</a>
, <a class="el" href="#adc14400a6be46fe268f46186d824c529ae5b3daf6a1e6bd6c8a46deea6fd64a70">ECMP</a>
 }</td></tr>
<tr class="memdesc:adc14400a6be46fe268f46186d824c529"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load balancing scheme we used.  <a href="#adc14400a6be46fe268f46186d824c529">More...</a><br /></td></tr>
<tr class="separator:adc14400a6be46fe268f46186d824c529"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a5f7beb0f421b452304d9fa8066a5e2b9" id="r_a5f7beb0f421b452304d9fa8066a5e2b9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a5f7beb0f421b452304d9fa8066a5e2b9">DOCA_LOG_REGISTER</a> (DOCA_AR_CORE)</td></tr>
<tr class="separator:a5f7beb0f421b452304d9fa8066a5e2b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3798ab1d93a62efde38d0dceae68a564" id="r_a3798ab1d93a62efde38d0dceae68a564"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3798ab1d93a62efde38d0dceae68a564">printPortStats</a> (struct cmdline *cl)</td></tr>
<tr class="memdesc:a3798ab1d93a62efde38d0dceae68a564"><td class="mdescLeft">&#160;</td><td class="mdescRight">print packets num the control plane recv and sent  <br /></td></tr>
<tr class="separator:a3798ab1d93a62efde38d0dceae68a564"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a4c0c29962f119d5792a248a86d6254" id="r_a3a4c0c29962f119d5792a248a86d6254"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3a4c0c29962f119d5792a248a86d6254">AR</a> (struct rte_mempool *pool, struct <a class="el" href="structdoca__ar__conn__match.html">doca_ar_conn_match</a> *match, struct rte_mbuf *m)</td></tr>
<tr class="memdesc:a3a4c0c29962f119d5792a248a86d6254"><td class="mdescLeft">&#160;</td><td class="mdescRight">the ar algorithm we used in doca-ar, this is the most critical function the whole app  <br /></td></tr>
<tr class="separator:a3a4c0c29962f119d5792a248a86d6254"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a5d5ca9671b5154e23deddd0926e8ef" id="r_a2a5d5ca9671b5154e23deddd0926e8ef"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a2a5d5ca9671b5154e23deddd0926e8ef">process_packets</a> (void *args)</td></tr>
<tr class="memdesc:a2a5d5ca9671b5154e23deddd0926e8ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">logic of processing control plane packets  <br /></td></tr>
<tr class="separator:a2a5d5ca9671b5154e23deddd0926e8ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5fd1c9f34435cf46054a71c400e4db7" id="r_ab5fd1c9f34435cf46054a71c400e4db7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ab5fd1c9f34435cf46054a71c400e4db7">doca_ar_cmd</a> ()</td></tr>
<tr class="memdesc:ab5fd1c9f34435cf46054a71c400e4db7"><td class="mdescLeft">&#160;</td><td class="mdescRight">enter into dpdk cmdline  <br /></td></tr>
<tr class="separator:ab5fd1c9f34435cf46054a71c400e4db7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81ba4c33d73e787f44182d413cd8ef47" id="r_a81ba4c33d73e787f44182d413cd8ef47"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a81ba4c33d73e787f44182d413cd8ef47">doca_ar</a> ()</td></tr>
<tr class="memdesc:a81ba4c33d73e787f44182d413cd8ef47"><td class="mdescLeft">&#160;</td><td class="mdescRight">start doca-ar and enter into cmdline  <br /></td></tr>
<tr class="separator:a81ba4c33d73e787f44182d413cd8ef47"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a93d1586ea70aaab425fd0b8654f14a81" id="r_a93d1586ea70aaab425fd0b8654f14a81"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="struct_port_stats.html">PortStats</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a93d1586ea70aaab425fd0b8654f14a81">__rte_cache_aligned</a></td></tr>
<tr class="separator:a93d1586ea70aaab425fd0b8654f14a81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8b5ba6ffc3a67384f0cf0ec05da2674" id="r_ad8b5ba6ffc3a67384f0cf0ec05da2674"><td class="memItemLeft" align="right" valign="top">volatile bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad8b5ba6ffc3a67384f0cf0ec05da2674">force_quit</a> = false</td></tr>
<tr class="memdesc:ad8b5ba6ffc3a67384f0cf0ec05da2674"><td class="mdescLeft">&#160;</td><td class="mdescRight">flag of quit  <br /></td></tr>
<tr class="separator:ad8b5ba6ffc3a67384f0cf0ec05da2674"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91ff5bcd077720873033f80133f9dce8" id="r_a91ff5bcd077720873033f80133f9dce8"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a91ff5bcd077720873033f80133f9dce8">runing_lore_id</a> = 0</td></tr>
<tr class="memdesc:a91ff5bcd077720873033f80133f9dce8"><td class="mdescLeft">&#160;</td><td class="mdescRight">id of lcore processing packets  <br /></td></tr>
<tr class="separator:a91ff5bcd077720873033f80133f9dce8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71b58ed90a1debb512d9ae075beeab78" id="r_a71b58ed90a1debb512d9ae075beeab78"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="struct_port_stats.html">PortStats</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a71b58ed90a1debb512d9ae075beeab78">portStats</a> [<a class="el" href="doca__ar__env_8h.html#a71d6ed3c98e428e7af3dac82a615c162">NB_PORTS</a>] = {0}</td></tr>
<tr class="memdesc:a71b58ed90a1debb512d9ae075beeab78"><td class="mdescLeft">&#160;</td><td class="mdescRight">packets num the control plane recv and sent  <br /></td></tr>
<tr class="separator:a71b58ed90a1debb512d9ae075beeab78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78ba818b26072c600d84843d0fb31230" id="r_a78ba818b26072c600d84843d0fb31230"><td class="memItemLeft" align="right" valign="top">enum <a class="el" href="#adc14400a6be46fe268f46186d824c529">LB_SCHEME</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a78ba818b26072c600d84843d0fb31230">lb_scheme</a> = <a class="el" href="#adc14400a6be46fe268f46186d824c529ae5b3daf6a1e6bd6c8a46deea6fd64a70">ECMP</a></td></tr>
<tr class="memdesc:a78ba818b26072c600d84843d0fb31230"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load balancing scheme we used.  <br /></td></tr>
<tr class="separator:a78ba818b26072c600d84843d0fb31230"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ebdcfd06d466245b0db028d44c904d7" id="r_a9ebdcfd06d466245b0db028d44c904d7"><td class="memItemLeft" align="right" valign="top">cmdline_parse_token_string_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9ebdcfd06d466245b0db028d44c904d7">cmd_simple</a></td></tr>
<tr class="separator:a9ebdcfd06d466245b0db028d44c904d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af000a555517b5c0341a980d3516164fa" id="r_af000a555517b5c0341a980d3516164fa"><td class="memItemLeft" align="right" valign="top">cmdline_parse_inst_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af000a555517b5c0341a980d3516164fa">simple_cmdline</a></td></tr>
<tr class="separator:af000a555517b5c0341a980d3516164fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae67a647c865004b51b53cdf0670d0d3a" id="r_ae67a647c865004b51b53cdf0670d0d3a"><td class="memItemLeft" align="right" valign="top">cmdline_parse_ctx_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae67a647c865004b51b53cdf0670d0d3a">main_ctx</a> []</td></tr>
<tr class="separator:ae67a647c865004b51b53cdf0670d0d3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>the critical logic of doca-ar </p>
<dl class="section author"><dt>Author</dt><dd>Mark Chen (<a href="#" onclick="location.href='mai'+'lto:'+'mar'+'kc'+'hen'+'77'+'888'+'@g'+'mai'+'l.'+'com'; return false;">markc<span class="obfuscator">.nosp@m.</span>hen7<span class="obfuscator">.nosp@m.</span>7888@<span class="obfuscator">.nosp@m.</span>gmai<span class="obfuscator">.nosp@m.</span>l.com</a>) </dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0 </dd></dl>
<dl class="section date"><dt>Date</dt><dd>2024-01-07</dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (c) 2024 </dd></dl>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a89703962ce99eb88357cc3d3756d3a8c" name="a89703962ce99eb88357cc3d3756d3a8c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a89703962ce99eb88357cc3d3756d3a8c">&#9670;&#160;</a></span>EXPIRE_TIME</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define EXPIRE_TIME&#160;&#160;&#160;10</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>default timeout of conn </p>

</div>
</div>
<a id="a49230f4b3f7e0f19009da05690abd30f" name="a49230f4b3f7e0f19009da05690abd30f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49230f4b3f7e0f19009da05690abd30f">&#9670;&#160;</a></span>PACKET_BURST</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PACKET_BURST&#160;&#160;&#160;128</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>num of tx_burst and rx_burst </p>

</div>
</div>
<a id="aead8d0d68bbe6348d01b095c1a557100" name="aead8d0d68bbe6348d01b095c1a557100"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aead8d0d68bbe6348d01b095c1a557100">&#9670;&#160;</a></span>PROBE_PATH_AMOUNT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PROBE_PATH_AMOUNT&#160;&#160;&#160;4</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>default probed paths amount and packets amount we sent </p>

</div>
</div>
<a id="aff3d24956ac78a4840a95e32cb39ba83" name="aff3d24956ac78a4840a95e32cb39ba83"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aff3d24956ac78a4840a95e32cb39ba83">&#9670;&#160;</a></span>PROBE_TIMEOUT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PROBE_TIMEOUT&#160;&#160;&#160;50</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Probe Timeout[ms]. </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="adc14400a6be46fe268f46186d824c529" name="adc14400a6be46fe268f46186d824c529"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc14400a6be46fe268f46186d824c529">&#9670;&#160;</a></span>LB_SCHEME</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="#adc14400a6be46fe268f46186d824c529">LB_SCHEME</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Load balancing scheme we used. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="adc14400a6be46fe268f46186d824c529aa7e29da9c14345bcc6cdd8325a8c61cb" name="adc14400a6be46fe268f46186d824c529aa7e29da9c14345bcc6cdd8325a8c61cb"></a>DOCA_AR&#160;</td><td class="fielddoc"><p>use doca-ar </p>
</td></tr>
<tr><td class="fieldname"><a id="adc14400a6be46fe268f46186d824c529ae5b3daf6a1e6bd6c8a46deea6fd64a70" name="adc14400a6be46fe268f46186d824c529ae5b3daf6a1e6bd6c8a46deea6fd64a70"></a>ECMP&#160;</td><td class="fielddoc"><p>use ecmp </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a3a4c0c29962f119d5792a248a86d6254" name="a3a4c0c29962f119d5792a248a86d6254"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a4c0c29962f119d5792a248a86d6254">&#9670;&#160;</a></span>AR()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t AR </td>
          <td>(</td>
          <td class="paramtype">struct rte_mempool *</td>          <td class="paramname"><span class="paramname"><em>pool</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structdoca__ar__conn__match.html">doca_ar_conn_match</a> *</td>          <td class="paramname"><span class="paramname"><em>match</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct rte_mbuf *</td>          <td class="paramname"><span class="paramname"><em>m</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>the ar algorithm we used in doca-ar, this is the most critical function the whole app </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pool</td><td>packets mempool </td></tr>
    <tr><td class="paramname">match</td><td>the match of new conn </td></tr>
    <tr><td class="paramname">m</td><td>packet of this new conn </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>uint16_t the best path we probed and the final src port of this new conn </dd></dl>
<p>Ether</p>
<p>IP</p>
<p>UDP</p>
<p>Payload</p>
<p>offload cksum</p>

</div>
</div>
<a id="a81ba4c33d73e787f44182d413cd8ef47" name="a81ba4c33d73e787f44182d413cd8ef47"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a81ba4c33d73e787f44182d413cd8ef47">&#9670;&#160;</a></span>doca_ar()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void doca_ar </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>start doca-ar and enter into cmdline </p>

</div>
</div>
<a id="ab5fd1c9f34435cf46054a71c400e4db7" name="ab5fd1c9f34435cf46054a71c400e4db7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab5fd1c9f34435cf46054a71c400e4db7">&#9670;&#160;</a></span>doca_ar_cmd()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void doca_ar_cmd </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>enter into dpdk cmdline </p>

</div>
</div>
<a id="a5f7beb0f421b452304d9fa8066a5e2b9" name="a5f7beb0f421b452304d9fa8066a5e2b9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5f7beb0f421b452304d9fa8066a5e2b9">&#9670;&#160;</a></span>DOCA_LOG_REGISTER()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DOCA_LOG_REGISTER </td>
          <td>(</td>
          <td class="paramtype">DOCA_AR_CORE</td>          <td class="paramname"><span class="paramname"></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a3798ab1d93a62efde38d0dceae68a564" name="a3798ab1d93a62efde38d0dceae68a564"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3798ab1d93a62efde38d0dceae68a564">&#9670;&#160;</a></span>printPortStats()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void printPortStats </td>
          <td>(</td>
          <td class="paramtype">struct cmdline *</td>          <td class="paramname"><span class="paramname"><em>cl</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>print packets num the control plane recv and sent </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cl</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a2a5d5ca9671b5154e23deddd0926e8ef" name="a2a5d5ca9671b5154e23deddd0926e8ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2a5d5ca9671b5154e23deddd0926e8ef">&#9670;&#160;</a></span>process_packets()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int process_packets </td>
          <td>(</td>
          <td class="paramtype">void *</td>          <td class="paramname"><span class="paramname"><em>args</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>logic of processing control plane packets </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">args</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a93d1586ea70aaab425fd0b8654f14a81" name="a93d1586ea70aaab425fd0b8654f14a81"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93d1586ea70aaab425fd0b8654f14a81">&#9670;&#160;</a></span>__rte_cache_aligned</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="struct_port_stats.html">PortStats</a> __rte_cache_aligned</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a9ebdcfd06d466245b0db028d44c904d7" name="a9ebdcfd06d466245b0db028d44c904d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9ebdcfd06d466245b0db028d44c904d7">&#9670;&#160;</a></span>cmd_simple</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cmdline_parse_token_string_t cmd_simple</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">=</div>
<div class="line">    TOKEN_STRING_INITIALIZER(<span class="keyword">struct</span> <a class="code hl_struct" href="structcmd__simple__result.html">cmd_simple_result</a>, simple, <span class="stringliteral">&quot;quit#dumpFDB#portStats#conntrack&quot;</span>)</div>
<div class="ttc" id="astructcmd__simple__result_html"><div class="ttname"><a href="structcmd__simple__result.html">cmd_simple_result</a></div><div class="ttdef"><b>Definition</b> doca_ar_core.c:278</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="ad8b5ba6ffc3a67384f0cf0ec05da2674" name="ad8b5ba6ffc3a67384f0cf0ec05da2674"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad8b5ba6ffc3a67384f0cf0ec05da2674">&#9670;&#160;</a></span>force_quit</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile bool force_quit = false</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>flag of quit </p>

</div>
</div>
<a id="a78ba818b26072c600d84843d0fb31230" name="a78ba818b26072c600d84843d0fb31230"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a78ba818b26072c600d84843d0fb31230">&#9670;&#160;</a></span>lb_scheme</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="#adc14400a6be46fe268f46186d824c529">LB_SCHEME</a> lb_scheme = <a class="el" href="#adc14400a6be46fe268f46186d824c529ae5b3daf6a1e6bd6c8a46deea6fd64a70">ECMP</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Load balancing scheme we used. </p>

</div>
</div>
<a id="ae67a647c865004b51b53cdf0670d0d3a" name="ae67a647c865004b51b53cdf0670d0d3a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae67a647c865004b51b53cdf0670d0d3a">&#9670;&#160;</a></span>main_ctx</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cmdline_parse_ctx_t main_ctx[]</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= {</div>
<div class="line">    &amp;<a class="code hl_variable" href="#af000a555517b5c0341a980d3516164fa">simple_cmdline</a>,</div>
<div class="line">    NULL}</div>
<div class="ttc" id="adoca__ar__core_8c_html_af000a555517b5c0341a980d3516164fa"><div class="ttname"><a href="#af000a555517b5c0341a980d3516164fa">simple_cmdline</a></div><div class="ttdeci">cmdline_parse_inst_t simple_cmdline</div><div class="ttdef"><b>Definition</b> doca_ar_core.c:309</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a71b58ed90a1debb512d9ae075beeab78" name="a71b58ed90a1debb512d9ae075beeab78"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a71b58ed90a1debb512d9ae075beeab78">&#9670;&#160;</a></span>portStats</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="struct_port_stats.html">PortStats</a> portStats[<a class="el" href="doca__ar__env_8h.html#a71d6ed3c98e428e7af3dac82a615c162">NB_PORTS</a>] = {0}</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>packets num the control plane recv and sent </p>

</div>
</div>
<a id="a91ff5bcd077720873033f80133f9dce8" name="a91ff5bcd077720873033f80133f9dce8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a91ff5bcd077720873033f80133f9dce8">&#9670;&#160;</a></span>runing_lore_id</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int runing_lore_id = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>id of lcore processing packets </p>

</div>
</div>
<a id="af000a555517b5c0341a980d3516164fa" name="af000a555517b5c0341a980d3516164fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af000a555517b5c0341a980d3516164fa">&#9670;&#160;</a></span>simple_cmdline</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cmdline_parse_inst_t simple_cmdline</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= {</div>
<div class="line">    .f = cmd_simple_parsed, </div>
<div class="line">    .data = NULL,           </div>
<div class="line">    .help_str = <span class="stringliteral">&quot;quit/dumpFDB/portStats/conntrack&quot;</span>,</div>
<div class="line">    .tokens = {</div>
<div class="line">        </div>
<div class="line">        (<span class="keywordtype">void</span> *)&amp;<a class="code hl_variable" href="#a9ebdcfd06d466245b0db028d44c904d7">cmd_simple</a>,</div>
<div class="line">        NULL,</div>
<div class="line">    },</div>
<div class="line">}</div>
<div class="ttc" id="adoca__ar__core_8c_html_a9ebdcfd06d466245b0db028d44c904d7"><div class="ttname"><a href="#a9ebdcfd06d466245b0db028d44c904d7">cmd_simple</a></div><div class="ttdeci">cmdline_parse_token_string_t cmd_simple</div><div class="ttdef"><b>Definition</b> doca_ar_core.c:307</div></div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="doca__ar__core_8c.html">doca_ar_core.c</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0 </li>
  </ul>
</div>
</body>
</html>
